package com.huawei.appmarket.service.settings.view.widget;

import android.content.Context;
import android.text.TextUtils.TruncateAt;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
import androidx.annotation.DrawableRes;
import o.azb;
import o.cjz;
import o.evf;
import o.ewm.d;
import o.ewm.h;
import o.ewm.j;

public class EnterLayout extends LinearLayout {
    private boolean ʻ;
    private ImageView ʼ;
    private TextView ˊ;
    private ImageView ˋ;
    private TextView ˎ;
    private View ˏ;
    private RelativeLayout ॱ;

    private void ˏ(android.content.Context r6, android.util.AttributeSet r7) {
        /* JADX: method processing error */
/*
Error: java.util.NoSuchElementException
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1444)
	at java.util.HashMap$KeyIterator.next(HashMap.java:1466)
	at jadx.core.dex.visitors.blocksmaker.BlockFinallyExtract.applyRemove(BlockFinallyExtract.java:535)
	at jadx.core.dex.visitors.blocksmaker.BlockFinallyExtract.extractFinally(BlockFinallyExtract.java:175)
	at jadx.core.dex.visitors.blocksmaker.BlockFinallyExtract.processExceptionHandler(BlockFinallyExtract.java:79)
	at jadx.core.dex.visitors.blocksmaker.BlockFinallyExtract.visit(BlockFinallyExtract.java:51)
	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)
	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)
	at jadx.core.ProcessClass.process(ProcessClass.java:37)
	at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:306)
	at jadx.api.JavaClass.decompile(JavaClass.java:62)
*/
        /*
        r5 = this;
        if (r7 == 0) goto L_0x0016;
    L_0x0002:
        r0 = o.ewm.o.ꜝ;
        r1 = r6.obtainStyledAttributes(r7, r0);
        r0 = o.ewm.o.ꜟॱ;	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        r2 = 0;	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        r0 = r1.getBoolean(r0, r2);	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        r5.ʻ = r0;	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        if (r1 == 0) goto L_0x0016;
    L_0x0013:
        r1.recycle();
    L_0x0016:
        return;
    L_0x0017:
        r0 = move-exception;
        r2 = "EnterLayout";	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        r3 = new java.lang.StringBuilder;	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        r3.<init>();	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        r4 = "init(AttributeSet attrs) ";	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        r3 = r3.append(r4);	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        r0 = r0.toString();	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        r0 = r3.append(r0);	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        r0 = r0.toString();	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        o.dna.ˊ(r2, r0);	 Catch:{ RuntimeException -> 0x0017, all -> 0x003a }
        if (r1 == 0) goto L_0x0016;
    L_0x0036:
        r1.recycle();
        goto L_0x0016;
    L_0x003a:
        r0 = move-exception;
        if (r1 == 0) goto L_0x0040;
    L_0x003d:
        r1.recycle();
    L_0x0040:
        throw r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.huawei.appmarket.service.settings.view.widget.EnterLayout.ˏ(android.content.Context, android.util.AttributeSet):void");
    }

    public EnterLayout(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        ˏ(context, attributeSet);
        ˊ(context);
    }

    public EnterLayout(Context context) {
        super(context);
        ˊ(context);
    }

    private void ˊ(Context context) {
        setOrientation(1);
        View inflate = ((LayoutInflater) context.getSystemService("layout_inflater")).inflate(h.ʴ, this);
        if (this.ʻ) {
            inflate.setPaddingRelative(azb.ʻ(context), inflate.getPaddingTop(), azb.ॱॱ(context), inflate.getPaddingBottom());
        } else {
            inflate.setPaddingRelative(azb.ˊ(context), inflate.getPaddingTop(), azb.ˏ(context), inflate.getPaddingBottom());
        }
        this.ॱ = (RelativeLayout) inflate.findViewById(j.ٴˋ);
        this.ˊ = (TextView) this.ॱ.findViewById(j.ʼᵢ);
        this.ˎ = (TextView) this.ॱ.findViewById(j.ʼᶫ);
        this.ˋ = (ImageView) inflate.findViewById(j.ˏͺ);
        this.ʼ = (ImageView) inflate.findViewById(j.ˌʾ);
        this.ˏ = inflate.findViewById(j.ᐧᐝ);
    }

    public void setHorizontalPadding(int i, int i2) {
        LayoutParams layoutParams = (LayoutParams) this.ॱ.getLayoutParams();
        if (layoutParams != null) {
            layoutParams.setMarginStart(i);
            layoutParams.setMarginEnd(i2);
        }
    }

    public void setMaxLines(int i) {
        this.ˊ.setMaxLines(i);
        this.ˊ.setEllipsize(TruncateAt.END);
        this.ˎ.setMaxLines(i);
        this.ˎ.setEllipsize(TruncateAt.END);
    }

    public void setDividerLinePadding(int i, int i2) {
        LayoutParams layoutParams = (LayoutParams) this.ˏ.getLayoutParams();
        if (layoutParams != null) {
            layoutParams.setMarginStart(i);
            layoutParams.setMarginEnd(i2);
        }
    }

    public void setArrowRightMargin(int i) {
        LayoutParams layoutParams = (LayoutParams) this.ˋ.getLayoutParams();
        if (layoutParams != null) {
            layoutParams.setMarginEnd(i);
        }
    }

    public void setNotEndLayout() {
        this.ˏ.setVisibility(0);
    }

    public void setLastLineGone() {
        if (this.ˏ != null) {
            this.ˏ.setVisibility(8);
        }
    }

    public void setIcon(@DrawableRes int i) {
        evf.ˏ(this.ʼ, i);
        this.ʼ.setVisibility(0);
        this.ॱ.setMinimumHeight(getContext().getResources().getDimensionPixelSize(d.ʻॱ));
    }

    public void setTitle(Object obj) {
        ˋ(this.ˊ, obj);
    }

    private void ˋ(TextView textView, Object obj) {
        if (obj != null) {
            if (obj instanceof String) {
                textView.setText((String) obj);
            }
            if (obj instanceof Integer) {
                textView.setText(((Integer) obj).intValue());
            }
        }
    }

    public void setMemo(Object obj) {
        ˋ(this.ˎ, obj);
    }

    public void setMemoVisibility(int i) {
        if (this.ˎ != null) {
            this.ˎ.setVisibility(i);
            if (i != 8) {
                return;
            }
            if (8 == this.ʼ.getVisibility()) {
                this.ॱ.setMinimumHeight(getContext().getResources().getDimensionPixelSize(d.ॱˎ));
            } else if (this.ʼ.getVisibility() == 0) {
                this.ॱ.setMinimumHeight(getContext().getResources().getDimensionPixelSize(d.ॱᐝ));
            }
        }
    }

    public void setArrorVisibility(int i) {
        if (this.ˋ != null) {
            this.ˋ.setVisibility(i);
        }
    }

    public void setTitleMedium() {
        if (this.ˊ != null) {
            cjz.ˎ(this.ˊ);
        }
    }
}
